﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAOTAgency;

namespace ManageTours
{
    public partial class Transporatations : Form
    {
        public Transporatations()
        {
            InitializeComponent();
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            DAO.Save();
            bindingSourceTransportations.DataSource = DAO.GetAllTransportations();    
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DAO.Cancel();
            bindingSourceTransportations.DataSource = DAO.GetAllHotelFacilities();
        }

        private void buttonBack_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Transporatations_Load(object sender, EventArgs e)
        {
            bindingSourceTransportations.DataSource = DAO.GetAllTransportations();
        }
    }
}
